package com.demo.daili;

public class Client {

	public static void main(String[] args) {
		WangPo wangPo=new WangPo(new PanJinLian());
		wangPo.happy();
		byte[] b={127,2};
		byteToShort(b);
	}
	
	public static void byteToShort(byte[] b){
		short s=0;
		short s0=(short)(b[0]&0xff);
		short s1=(short)(b[1]&0xff);
		s1<<=8;
		System.out.println(s1+"\t\t"+s0);
		s=(short)(s0|s1);
		System.out.println(s);
		short ss=0;
		for (byte c : b) {
			ss+=c;
		}
		System.out.println(ss);
	}
}
